Now that you’ve had a look around, you’re ready to
start working with the Registry’s keys and settings. In this section,
I’ll give you the general procedures for basic tasks, such as
modifying, adding, renaming, deleting, and searching for entries, and
more. These techniques will serve you well throughout the rest of the
book when I take you through some specific Registry modifications.
Changing the Value of a Registry Entry
Changing
the value of a Registry entry is a matter of finding the appropriate
key, displaying the setting you want to change, and editing the
setting’s value. Unfortunately, finding the key you need isn’t always a
simple matter. Knowing the root keys and their main subkeys, as
described earlier, will certainly help, and the Registry Editor has a
Find feature that’s invaluable. (I’ll show you how to use it later.)
To
illustrate how this process works, let’s work through an example:
changing your registered owner name and company name. In earlier
versions of Windows, the installation process probably asked you to
enter your name and, optionally, your company name. These registered
names appear in several places as you work with Windows:
If you select Help, About in most Windows 7 programs, your registered names appear in the About dialog box.
If
you install a 32-bit application, the installation program uses your
registered names for its own records (although you usually get a chance
to make changes).
Unfortunately,
if you install a clean version of Windows 7, Setup doesn’t ask you for
this data, and it takes your username as your registered owner name.
(If you upgraded to Windows 7 for Windows XP, the owner name and
company name were brought over from your previous version of Windows.)
With these names appearing in so many places, it’s good to know that
you can change either or both names (for example, to put in your proper
names if Windows 7 doesn’t have them or if you give the computer to
another person). The secret lies in the following key:
HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion
To get to this key, you open the branches in the Registry Editor’s tree pane: HKEY_LOCAL_MACHINE, and then SOFTWARE, and then Microsoft, and then Windows NT. Finally, click the CurrentVersion subkey to select it. Here, you see a number of settings, but two are of interest to us (see Figure 1):
RegisteredOrganization | This setting contains your registered company name. |
RegisteredOwner | This setting contains your registered name. |
Tip
If
you have keys that you visit often, you can save them as favorites to
avoid trudging through endless branches in the keys pane. To do this,
navigate to the key and then select Favorites, Add to Favorites. In the
Add to Favorites dialog box, edit the Favorite Name text box, if
desired, and then click OK. To navigate to a favorite key, pull down
the Favorites menu and select the key name from the list that appears
at the bottom of the menu.
Now you open the setting for editing by using any of the following techniques:
Select the setting name and either select Edit, Modify or press Enter.
Double-click the setting name.
Right-click the setting name and click Modify from the context menu.
The
dialog box that appears depends on the value type you’re dealing with,
as discussed in the next few sections. Note that edited settings are
written to the Registry right away, but the changes might not go into
effect immediately. In many cases, you need to exit the Registry Editor
and then either log off or restart Windows 7.